package com.fm.openinstall.a;

import java.util.concurrent.*;
import com.fm.openinstall.f.*;
import java.util.*;
import com.fm.openinstall.c.*;

class l implements Runnable
{
    final /* synthetic */ f a;

    l(final f a) {
        this.a = a;
    }

    @Override
    public void run() {
        int n = 0;
        b a5;
        while (true) {
            final a b = this.a.b();
            final String a = this.a.a("init");
            final f a2 = this.a;
            final Map a3 = a2.a(a2.k);
            final f a4 = this.a;
            a5 = b.a(a, a3, a4.b(a4.k));
            if (a5.a() != c.b) {
                break;
            }
            try {
                if (this.a.b.poll(this.a.a(n), TimeUnit.MILLISECONDS) != null) {
                    n = 0;
                }
            }
            catch (InterruptedException ex) {
                ex.printStackTrace();
            }
            ++n;
        }
        this.a.b(a5.e());
        Label_0203: {
            f f;
            com.fm.openinstall.b.c c;
            if (a5.a() == com.fm.openinstall.c.c.a) {
                d.a(this.a.k, "FM_init_data", a5.d());
                f = this.a;
                c = com.fm.openinstall.b.c.c;
            }
            else if (a5.a() == com.fm.openinstall.c.c.c) {
                d.a(this.a.k, "FM_init_msg", a5.c());
                f = this.a;
                c = com.fm.openinstall.b.c.e;
            }
            else {
                if (a5.a() != com.fm.openinstall.c.c.b) {
                    break Label_0203;
                }
                d.a(this.a.k, "FM_init_msg", a5.c());
                f = this.a;
                c = com.fm.openinstall.b.c.d;
            }
            f.h = c;
        }
        this.a.a.countDown();
        d.a(this.a.k, "FM_init_state", this.a.h.a());
    }
}
